import { lazy } from "react";
const Home = lazy(() => import("../pages/Home"));
const List = lazy(() => import("../pages/LIst"));

const routers = [
  {
    title: "home",
    path: "/home",
    component: Home,
  },
  {
    title: "list",
    path: "/list/:id",
    component: List,
  },
  {
    title: "login",
    path: "/login",
    component: lazy(() => import("../pages/Login")),
  },
  {
    title: "todolist",
    path: "/todolist",
    component: lazy(() => import("../pages/Todolist")),
  },
  {
    title: "hoc",
    path: "/hoc",
    component: lazy(() => import("../pages/Hoc")),
  },
  {
    title: "useReducerCountry",
    path: "/useReducerCountry",
    component: lazy(() => import("../pages/useReducerCountry")),
  },
  {
    title: "uesReducerRedux",
    path: "/uesReducerRedux",
    component: lazy(() => import("../pages/uesReducerRedux")),
  },
  {
    title: "tst",
    path: "/tst",
    component: lazy(() => import("../pages/tst")),
  },
  {
    title: "setstate",
    path: "/setstate",
    component: lazy(() => import("../pages/setstate")),
  },
  {
    title: "test_demo",
    path: "/test_demo",
    component: lazy(() => import("../pages/test_demo")),
  },
  {
    title: "404",
    path: "",
    component: lazy(() => import("../pages/404")),
  },
];

export default routers;
